Help Balloons in Static Windows
To provide help balloons for the static windows of your application
without modifying its code, create a resource of type 'hwin' ( window
help) and additional resources of type 'hrct' (rectangle help) or 'hdlg'
(dialog item help). If your static windows provide help balloons with
these resources, the Help Manager automatically tracks the cursor and displays and removes help balloons as the cursor moves into and
out of the hot rectangles associated with these resources.
The 'hwin' resource allows you to associate 'hrct' and 'hdlg' resources
with your static windows. You use the 'hrct' and 'hdlg' resources to
define help balloons for the individual elements within your windows.
While the
resource as the hot rectangles for 'hdlg' resources, you can specify
your own hot rectangles for dialog boxes and other static windows when
using 'hrct ' resources.
An 'hrct' resource specifies tip locations, hot rectangles, balloon
definition functions, variation codes, and help content for areas within
a static window.
explains how the 'hdlg' resource describes the tip, alternate
rectangle, and help information for dialog items in a dialog box. That
section also describes how to associate the 'hdlg' resource with a
dialog box by adding an item of type helpItem to the dialog box's
'DITL' resource. This section describes how you can instead treat
your dialog boxes or alert boxes as static windows and use an 'hwin'
resource instead of helpItem items to associate them with 'hdlg'
resources.
The 'hwin' resource identifies windows by their titles or by their
windowKind values. You can list all of your windows within one 'hwin'
resource, or you can create separate 'hwin' resources for your
separate windows. (You will probably find that it is easier to maintain
your window help if you create only one 'hwin' resource, but, as
described later in this section, you must create separate 'hwin'
resources for windows that require different options-for example, one
window matched to its 'hwin' resource by a string anywhere in the
window's title and another window matched to its 'hwin' resource only
by the exact string of the window's title.) An 'hwin' resource contains
the resource ID (or IDs) of one or more 'hrct' and 'hdlg' resources. An
'hwin' resource can use 'hrct' and 'hdlg' resources for various parts of
the same window.
To use an 'hwin' resource, the window must have either a title or a
windowKind value in its window record that adequately distinguishes
it from other windows. Within an 'hwin' resource, you could identify
the Verb Tenses window shown in the Figure above by its title, and you
could identify the scrolling palette window in the Figure above by its
record. Note that windowKind values of 0, 1, and 3 through 7 are
reserved by the Operating System and that dialog boxes or alert boxes
must have a value of 2. Because your dialog boxes and alert boxes must
have a windowKind value of 2, you can use this value to define only one
'hwin' resource for all un titled dialog boxes and alert boxes. You may
find it difficult-using help resources alone-to provide help balloons
for un titled dialog and alert boxes. However, you can use an 'hwin'
resource to associate generic help for the common elements of all your
un titled dialog boxes and alert boxes, and you can use the
elements among them.
You describe the tip, a rectangle, and help information for each
object in static windows using either 'hrct' or 'hdlg' resources.
Shown here is the general format of an 'hrct' resource. 'Hdlg'
resources are described in,
Rectangle help
Component resource element
Options
Balloon definition function
Variation code
First hot rectangle Identifier for help balloon content
Tip location
Hot rectangle coordinates
Balloon content for hot rectangle
Next hot rectangle (Same as for first hot rectangle)
.
.
.
The 'hrct' resource contains a header and information that describes
the hot rectangles within the window and the help balloons associated
with each hot rectangle.
As with the other help resources, specify the HelpMgrVersion
constant in the first field of the header component of the 'hrct'
resource. In the options field, specify a constant (normally,
hmDefaultOptions) or the sum of several constants' values.
Specify the balloon definition function and variation code (both